package DesignPatern.A22_享元模式;

/**
 * @Author: Du
 * @Date: 2021/8/12 15:13
 */
public class A01_Main
{
    public static void main(String[] args)
    {
        String s1 = "abc";
        String s2 = "def";
        String s3 = "abcdef";
        String s4 = s1 + s2;
        String s5 = (s1 + s2).intern();
    
        System.out.println(s3 == s4);
        System.out.println(s3 == s5);
    }
}
